package com.ruoyi.health.report.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.SysFile;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author ChenYF
 * @date 2025-09-03 16:46
 */
@FeignClient(contextId = "RemoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileService.class)
public interface IRemoteFileService {

    @PostMapping(value = "upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    R<SysFile> upload(@RequestPart(value = "file") MultipartFile file, @RequestPart(value = "fileName") String fileName);
}
